/*
** Lua binding: particlescript
** Generated automatically by tolua++-1.0.92 on Thu Jun  3 13:12:27 2010.
*/

#ifndef __cplusplus
#include "stdlib.h"
#endif
#include "string.h"

#include "tolua++.h"

/* Exported function */
TOLUA_API int  tolua_particlescript_open (lua_State* tolua_S);

#include "lua_particle_sys.h"

/* function to register type */
static void tolua_reg_types (lua_State* tolua_S)
{
}

/* get function: G3PS_NumMaxParticles */
#ifndef TOLUA_DISABLE_tolua_get_NumMaxParticles
static int tolua_get_NumMaxParticles(lua_State* tolua_S)
{
  tolua_pushnumber(tolua_S,(lua_Number)G3PS_NumMaxParticles);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: G3PS_NumMaxParticles */
#ifndef TOLUA_DISABLE_tolua_set_NumMaxParticles
static int tolua_set_NumMaxParticles(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  G3PS_NumMaxParticles = ((int)  tolua_tonumber(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: G3PS_NumToRelease */
#ifndef TOLUA_DISABLE_tolua_get_NumToRelease
static int tolua_get_NumToRelease(lua_State* tolua_S)
{
  tolua_pushnumber(tolua_S,(lua_Number)G3PS_NumToRelease);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: G3PS_NumToRelease */
#ifndef TOLUA_DISABLE_tolua_set_NumToRelease
static int tolua_set_NumToRelease(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  G3PS_NumToRelease = ((int)  tolua_tonumber(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: G3PS_ReleaseInterval */
#ifndef TOLUA_DISABLE_tolua_get_ReleaseInterval
static int tolua_get_ReleaseInterval(lua_State* tolua_S)
{
  tolua_pushnumber(tolua_S,(lua_Number)G3PS_ReleaseInterval);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: G3PS_ReleaseInterval */
#ifndef TOLUA_DISABLE_tolua_set_ReleaseInterval
static int tolua_set_ReleaseInterval(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  G3PS_ReleaseInterval = ((float)  tolua_tonumber(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: G3PS_LifeCycle */
#ifndef TOLUA_DISABLE_tolua_get_LifeCycle
static int tolua_get_LifeCycle(lua_State* tolua_S)
{
  tolua_pushnumber(tolua_S,(lua_Number)G3PS_LifeCycle);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: G3PS_LifeCycle */
#ifndef TOLUA_DISABLE_tolua_set_LifeCycle
static int tolua_set_LifeCycle(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  G3PS_LifeCycle = ((float)  tolua_tonumber(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: G3PS_Size */
#ifndef TOLUA_DISABLE_tolua_get_Size
static int tolua_get_Size(lua_State* tolua_S)
{
  tolua_pushnumber(tolua_S,(lua_Number)G3PS_Size);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: G3PS_Size */
#ifndef TOLUA_DISABLE_tolua_set_Size
static int tolua_set_Size(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  G3PS_Size = ((float)  tolua_tonumber(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: G3PS_Mass */
#ifndef TOLUA_DISABLE_tolua_get_Mass
static int tolua_get_Mass(lua_State* tolua_S)
{
  tolua_pushnumber(tolua_S,(lua_Number)G3PS_Mass);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: G3PS_Mass */
#ifndef TOLUA_DISABLE_tolua_set_Mass
static int tolua_set_Mass(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  G3PS_Mass = ((float)  tolua_tonumber(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: G3PS_AirResistence */
#ifndef TOLUA_DISABLE_tolua_get_AirResistence
static int tolua_get_AirResistence(lua_State* tolua_S)
{
  tolua_pushboolean(tolua_S,(bool)G3PS_AirResistence);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: G3PS_AirResistence */
#ifndef TOLUA_DISABLE_tolua_set_AirResistence
static int tolua_set_AirResistence(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!tolua_isboolean(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  G3PS_AirResistence = ((bool)  tolua_toboolean(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: G3PS_VelocityVar */
#ifndef TOLUA_DISABLE_tolua_get_VelocityVariation
static int tolua_get_VelocityVariation(lua_State* tolua_S)
{
  tolua_pushnumber(tolua_S,(lua_Number)G3PS_VelocityVar);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: G3PS_VelocityVar */
#ifndef TOLUA_DISABLE_tolua_set_VelocityVariation
static int tolua_set_VelocityVariation(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  G3PS_VelocityVar = ((float)  tolua_tonumber(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: G3PS_Filter */
#ifndef TOLUA_DISABLE_tolua_get_TextureFilter
static int tolua_get_TextureFilter(lua_State* tolua_S)
{
  tolua_pushnumber(tolua_S,(lua_Number)G3PS_Filter);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: G3PS_Filter */
#ifndef TOLUA_DISABLE_tolua_set_TextureFilter
static int tolua_set_TextureFilter(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  G3PS_Filter = ((TEXTURE_FILTER) (int)  tolua_tonumber(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* function: PS_SetBitmap */
#ifndef TOLUA_DISABLE_tolua_particlescript_SetBitmap00
static int tolua_particlescript_SetBitmap00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isstring(tolua_S,1,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const char* aFilename = ((const char*)  tolua_tostring(tolua_S,1,0));
  {
   PS_SetBitmap(aFilename);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'SetBitmap'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: PS_SetPosition */
#ifndef TOLUA_DISABLE_tolua_particlescript_SetPosition00
static int tolua_particlescript_SetPosition00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,4,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  float aX = ((float)  tolua_tonumber(tolua_S,1,0));
  float aY = ((float)  tolua_tonumber(tolua_S,2,0));
  float aZ = ((float)  tolua_tonumber(tolua_S,3,0));
  {
   PS_SetPosition(aX,aY,aZ);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'SetPosition'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: PS_SetVelocity */
#ifndef TOLUA_DISABLE_tolua_particlescript_SetVelocity00
static int tolua_particlescript_SetVelocity00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,4,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  float aX = ((float)  tolua_tonumber(tolua_S,1,0));
  float aY = ((float)  tolua_tonumber(tolua_S,2,0));
  float aZ = ((float)  tolua_tonumber(tolua_S,3,0));
  {
   PS_SetVelocity(aX,aY,aZ);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'SetVelocity'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: PS_SetGravity */
#ifndef TOLUA_DISABLE_tolua_particlescript_SetGravity00
static int tolua_particlescript_SetGravity00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,4,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  float aX = ((float)  tolua_tonumber(tolua_S,1,0));
  float aY = ((float)  tolua_tonumber(tolua_S,2,0));
  float aZ = ((float)  tolua_tonumber(tolua_S,3,0));
  {
   PS_SetGravity(aX,aY,aZ);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'SetGravity'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* Open function */
TOLUA_API int tolua_particlescript_open (lua_State* tolua_S)
{
 tolua_open(tolua_S);
 tolua_reg_types(tolua_S);
 tolua_module(tolua_S,NULL,1);
 tolua_beginmodule(tolua_S,NULL);
  tolua_constant(tolua_S,"GTF_NEAREST",GTF_NEAREST);
  tolua_constant(tolua_S,"GTF_LINEAR",GTF_LINEAR);
  tolua_constant(tolua_S,"GTF_MIPMAP",GTF_MIPMAP);
  tolua_variable(tolua_S,"NumMaxParticles",tolua_get_NumMaxParticles,tolua_set_NumMaxParticles);
  tolua_variable(tolua_S,"NumToRelease",tolua_get_NumToRelease,tolua_set_NumToRelease);
  tolua_variable(tolua_S,"ReleaseInterval",tolua_get_ReleaseInterval,tolua_set_ReleaseInterval);
  tolua_variable(tolua_S,"LifeCycle",tolua_get_LifeCycle,tolua_set_LifeCycle);
  tolua_variable(tolua_S,"Size",tolua_get_Size,tolua_set_Size);
  tolua_variable(tolua_S,"Mass",tolua_get_Mass,tolua_set_Mass);
  tolua_variable(tolua_S,"AirResistence",tolua_get_AirResistence,tolua_set_AirResistence);
  tolua_variable(tolua_S,"VelocityVariation",tolua_get_VelocityVariation,tolua_set_VelocityVariation);
  tolua_variable(tolua_S,"TextureFilter",tolua_get_TextureFilter,tolua_set_TextureFilter);
  tolua_function(tolua_S,"SetBitmap",tolua_particlescript_SetBitmap00);
  tolua_function(tolua_S,"SetPosition",tolua_particlescript_SetPosition00);
  tolua_function(tolua_S,"SetVelocity",tolua_particlescript_SetVelocity00);
  tolua_function(tolua_S,"SetGravity",tolua_particlescript_SetGravity00);
 tolua_endmodule(tolua_S);
 return 1;
}


#if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM >= 501
 TOLUA_API int luaopen_particlescript (lua_State* tolua_S) {
 return tolua_particlescript_open(tolua_S);
};
#endif

